﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NUnit.Framework;
using COFE.Core.Utils;

namespace COFE.Core.UnitTest
{
    [TestFixture]
    public class TestUtils
    {
        [Test]
        public void ParamStringToDic()
        {
            var dic = StringUtils.ParamStringToDic("login=abc&pass=xyz");
            Assert.AreEqual(2, dic.Count);
            Assert.AreEqual("login", new List<string>(dic.Keys)[0]);
            Assert.AreEqual("abc", dic["login"]);

            Assert.AreEqual("pass", new List<string>(dic.Keys)[1]);            
            Assert.AreEqual("xyz", dic["pass"]);
        }


    }
}
